 {% extends 'base4bs.html' %}
 {% block content %}
    <div class="container">
        <form method="post">
            {{ form.csrf_token }} <!-- 渲染CSRF令牌隐藏字段 -->
            <div class="form-group">
                {{ form.username.label }}
                {{ form.username(class='form-control') }}
                {% for error in form.username.errors %}
                    <small class="error">{{error}}</small>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.password.label }}
                {{ form.password(class='form-control') }}
                {% for error in form.password.errors %}
                    <small class="error">{{error}}</small>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.mark.label }}
                {{ form.mark(class='form-control',required='') }}
                {% for error in form.mark.errors %}
                    <small class="error">{{error}}</small>
                {% endfor %}
            </div>
            <div class="form-group">
                {{ form.age.label }}
                {{ form.age(class='form-control') }}
                {% for error in form.age.errors %}
                    <small class="error">{{error}}</small>
                {% endfor %}
            </div>
            <div class="form-check">
                {{ form.remember(class='form-check-input') }}
                {{ form.remember.label }}
            </div>

            {{ form.submit(class='btn btn-primary') }}
        </form>
    </div>
 {% endblock %}
